<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../css/layui/css/layui.css"  media="all">
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
          
              
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend>商品信息描述</legend>
</fieldset>
 
<form class="layui-form" action="">

  <div class="layui-form-item">
    <label class="layui-form-label">商品名：</label>
    <div class="layui-input-block">
      <input type="text" name="itemName" lay-verify="required" lay-reqtext="商品名不能为空" placeholder="请输入" autocomplete="off" class="layui-input">
    </div>
  </div>

  
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">价格：</label>
      <div class="layui-input-inline">
 <input  name="Price" class="layui-input "required lay-verify="required" type="number" step="1"  min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''">
      </div>
    </div>
	
  <div class="layui-form-item">
    <label class="layui-form-label">数量：</label>
    <div class="layui-input-inline">
    <input name="Number" class="layui-input " value="" placeholder="请输入金额" autocomplete="off" type="number" required lay-verify="required" maxlength="11" onKeyUp="this.value=this.value.replace(/[^\.\d]/g,'');this.value=this.value.replace('.','');">
    </div>
  </div>
    <div class="layui-form-item">
    <label class="layui-form-label">商品描述</label>
    <div class="layui-input-block">
      <input type="text" name="itemName"style="height:200px;" placeholder="请描述商品" autocomplete="off" class="layui-input">
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">图片外链：</label>
    <div class="layui-input-block">
      <input type="text" v-model="pageurl"name="itemName" lay-verify="url" placeholder="请在网页中按F12看图片的源地址(大多在src属性中,如直接复制网页地址无效)" autocomplete="off" class="layui-input">
    </div>
  </div>

  <div class="layui-form-item">
	  
    <div class="layui-input-block">
      <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
 
<!-- 示例-970 -->
<ins class="adsbygoogle" style="display:inline-block;width:970px;height:90px" data-ad-client="ca-pub-6111334333458862" data-ad-slot="3820120620"></ins>
  

<script src="../css/layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>

layui.use(['form'], function(){
  var form = layui.form
  ,layer = layui.layer

  //监听提交
  form.on('submit(demo1)', function(data){

    layer.alert(JSON.stringify(data.field), {
      title: '最终的提交信息'
    })
    return false;
  });

});
</script>

</body>
</html>